package com.aaron.contentcenter.feignclient;

import com.aaron.contentcenter.domain.dto.user.UserDTO;
import com.aaron.contentcenter.feignclient.fallback.UserCenterFallback;
import com.aaron.contentcenter.feignclient.fallback.UserCenterFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * Description:
 *
 * @author linzhj
 * @date 2021/7/11 23:40
 */
//@FeignClient(name = "user-center" , configuration=UserCenterFeignConfig.class)
//@FeignClient(name = "user-center", fallback = UserCenterFallback.class)
@FeignClient(name = "user-center", fallbackFactory = UserCenterFallbackFactory.class)
public interface UserCenterFeignClient {

    /**
     *
     * @param id
     * @return
     */
    @GetMapping("/users/{id}")
    UserDTO findById(@PathVariable Integer id);
}
